package com.多线程基础.锁的常用情况.Lock锁实现;
import com.多线程基础.锁的常用情况.同步方法锁使用.MyRunnable;

public class ThreadDemo {
    public static void main(String[] args) throws InterruptedException {
        MyRunnable mr=new MyRunnable();
        Thread t1=new Thread(mr);
        Thread t2=new Thread(mr);
        Thread t3=new Thread(mr);
        t1.setName("1");
        t2.setName("2");
        t3.setName("3");
        t1.start();
        t2.start();
        t3.start();
        //StringBuffer
    }
}
